package com.biz.primus.app.rest.feign.order;

import com.biz.primus.app.rest.degraded.order.DegradedOrderFeignClient;
import com.biz.primus.app.rest.degraded.order.DepradedOrderEvaluationFeignClient;
import com.biz.primus.model.evaluation.vo.DeliveryEvaluationVO;
import com.biz.primus.model.evaluation.vo.OrderEvaluationVO;
import com.biz.primus.model.evaluation.vo.ProductEvaluationVO;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * OrderEvaluationFeignClient
 *
 * @author Tiger Feng
 * @date 2017年11月28日
 */
@FeignClient(qualifier = "evaluationFeignClient", name = "service-evaluation", fallback = DepradedOrderEvaluationFeignClient.class)
public interface OrderEvaluationFeignClient {
    @PostMapping("courier")
    OrderEvaluationVO evaluateCourier(
            @RequestBody DeliveryEvaluationVO vo);

    @PostMapping("product")
    OrderEvaluationVO evaluateProduct(
            @RequestBody ProductEvaluationVO vo);

    @GetMapping("getOrderEvalutionByOrderCode")
    OrderEvaluationVO getOrderEvalutionByOrderCode(@RequestParam("orderCode") String orderCode);
}
